//: C03:CatsInHats.cpp
// Simple demonstration of recursion
#include <iostream>

void removeHat(char cat){
    using namespace std;
    for(char c = 'A'; c < cat; c++){
        cout << ' ';
    }
    if(cat <= 'Z'){
        cout << "cat " << cat << '\n';
        removeHat(cat + 1);    // Recursive call
    }else{
        cout << "VOOM!!!" << '\n';
    }
}

int main(void){
    removeHat('A');
    return 0;
}
